<?php $this->load->view('_header'); ?>

            <div id="main-content">
                <div id="left">
        <div id="adviser">
            <div class="title">
                <a class="link" href="/index.php?c=adviser&m=index">顾问单位</a>
                <a class="more" href="/index.php?c=adviser&m=index">more</a></div>
            <div class="content">
                <ul>
                    <?php foreach ($advisers as $adviser): ?>
                        <li>
                            <a href="/index.php?c=adviser&m=show&id=<?php echo $adviser->id; ?>">
                                <?php echo $adviser->name; ?>
                            </a>
                        </li>
                    <?php endforeach; ?>
                    </ul>
                </div>
            </div>
            <div id="contact">
                <div class="title">
                    <a class="link" href="/index.php?c=home&m=contact">联系我们</a>
                    <a class="more" href="/index.php?c=home&m=contact">more</a>
                </div>
                <div class="content">
                    <div class="img">
					<img src="/assets/images/contact.gif" alt="contact"/>
					</div>
                    <ul>
                        <?php if($contact != false): ?>
                        <li>联系电话：<?php echo $contact->telephone; ?></li>
                        <li>电子邮箱：<?php echo $contact->email; ?></li>
                        <li>详细地址：<?php echo $contact->address; ?></li>
                        <?php else: ?>
                        <li>联系电话：0371—86101071</li>
                        <li>电子邮箱：hn90law@163.com</li>
                        <li>详细地址：河南省郑州市金水区曼哈顿广场6幢1单元6层东户</li>
                        <?php endif; ?>
                    </ul>
                    <div class="img">
					<a target="_blank" href="http://ditu.google.cn/maps?q=34.761778%2C113.708071&oe=utf-8&rls=org.mozilla:zh-CN:official&client=firefox-a&um=1&ie=UTF-8&sa=N&hl=zh-CN&tab=wl">
						<img src="/assets/images/map.gif" alt="map"/>
						</a>
						</div>
                </div>
            </div>
        </div>

                <div id="right">
                    <div id="firm">
                        <div class="title">
                            <a class="link" href="/index.php?c=home&m=firm">律所简介</a>
                            <a class ="more" href="/index.php?c=home&m=firm">more</a>
                        </div>
                        <div class="content">
                            <?php if(isset($firm)&&$firm!==false): ?>
                            <?php echo preg_match("/(<p[^<>]*>.+?<\/p>){3}/",$firm->content,$r)?$r[0]:''; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div id="lawyer">
                        <div class="title">
                            <a class="link" href="/index.php?c=home&m=lawyer">律师风采</a>
                            <a class="more" href="/index.php?c=home&m=lawyer">more</a>
                        </div>
                        <div class="content">
                            <marquee direction="left" scrollamount="2" behavior="alternate">
                                <table cellspacing="5">
                                    <tr>
										<!-- 首席律师 -->
										<?php if(isset($header)&&($header!==false)): ?>
										<?php if($photo = $this->photo->find($header->photo_id)): ?>
										<td>
											<a href="/index.php?c=home&m=header">
												<?php echo img('assets/images/uploads/'.$photo->file_name); ?>
												<br/>
												<?php echo $header->name; ?>
											</a>
										</td>
										<?php endif; ?>
										<?php endif; ?>
										
										<!-- 律师团队 -->
										<?php if(isset($lawyers)&&$lawyers!=false): ?>
											<?php foreach($lawyers as $lawyer): ?>
												<?php if($photo = $this->photo->find($lawyer->photo_id)): ?>
													<td>
														<a href="/index.php?c=lawyer&m=show&id=<?php echo $lawyer->id; ?>">
															<?php echo img('/assets/images/uploads/'.$photo->file_name); ?>
															<br/>
															<?php echo $lawyer->name; ?>
														</a>
													</td>
												<?php endif; ?>
											<?php endforeach; ?>
										<?php endif; ?>
                                    </tr>
                                </table>
                            </marquee>
                        </div>
                    </div>
					<div class="clear"></div>
                    <div id="news">
                        <div class="title">
                            <a class="link" href="/index.php?c=home&m=news">久灵资讯</a>
                            <a class="more" href="/index.php?c=home&m=news">more</a>
                        </div>
                        <div class="content">
                            <ul>
                                <?php foreach($news as $n): ?>
                                <li>
                                    <div class="news-title left">
                                        【久灵资讯】
                                        <a href="/index.php?c=news&m=show&id=<?php echo $n->id; ?>">
                                    <?php echo substr($n->title,0,72).(strlen($n->title)>72?'……':''); ?>
                                        </a>
                                    </div>
                                    <div class="time"><?php echo $n->created_at; ?></div>
                                </li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            

<?php $this->load->view('_footer'); ?>
